Skip to content

ci: ensure build works with GOARCH=wasm #1757

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ti-mo
Copy link
Collaborator

@ti-mo ti-mo commented Apr 17, 2025

Add wasm to list of little-endian arches for NativeEndian as well as bpf2go output.
Make sure at least everything builds against the wasm target of the official Go toolchain.

This change allows ebpf-go to be imported into projects using GOARCH=wasm.

Signed-off-by: Timo Beckers <[email protected]>
@ti-mo ti-mo requested a review from a team as a code owner April 17, 2025 07:28
@ti-mo ti-mo mentioned this pull request Apr 17, 2025
ti-mo added 2 commits April 17, 2025 11:52
In order for `GOOS=js GOARCH=wasm go build ./...` to work on the repository,
the examples need to build correctly in CI.

Adding 'wasm' as a target without a C target name won't include it in the
bpf2go help text under `Supported targets`, it will only make it appear in
the go:build statements in the output.

Signed-off-by: Timo Beckers <[email protected]>
Signed-off-by: Timo Beckers <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant